/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.mortbay.jetty.pico.components;

import java.util.List;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SetupRender;
import org.mortbay.jetty.pico.entities.Category;

/**
 *
 * @author Hnmtuan
 */
public class SubmenuMain {

    @Parameter(required = true)
    private Category cateObj;
    @Property
    private Category category;

    @SetupRender
    boolean isShow() {
        return (cateObj == null || cateObj.getCategoryList() == null || cateObj.getCategoryList().size() < 1) ? false : true;
    }

    public List<Category> getList() {
        return cateObj.getCategoryList();
    }
}
